/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ant;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
@Entity
@Table(name = "clients")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Clients.findAll", query = "SELECT c FROM Clients c"),
@NamedQuery(name = "Clients.findByIdClient", query = "SELECT c FROM Clients c WHERE c.idClient = :idClient"),
@NamedQuery(name = "Clients.findByNom", query = "SELECT c FROM Clients c WHERE c.nom = :nom")})
public class Clients implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "idClient")
private Integer idClient;
@Size(max = 255)
@Column(name = "nom")
private String nom;
public Clients() {
}
public Clients(Integer idClient) {
this.idClient = idClient;
}
public Integer getIdClient() {
return idClient;
}
public void setIdClient(Integer idClient) {
this.idClient = idClient;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idClient != null ? idClient.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Clients)) {
return false;
}
Clients other = (Clients) object;
if ((this.idClient == null && other.idClient != null) || (this.idClient != null && !this.idClient.equals(other.idClient))) {
return false;
}
return true;
}
@Override
public String toString() {
return "ant.Clients[ idClient=" + idClient + " ]";
}
}